package com.ushine.web.template.decryption.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ushine.web.template.decryption.mapper.FieldDecryptionMapper;
import com.ushine.web.template.decryption.model.FieldDecryptionDO;
import com.ushine.web.template.decryption.service.IFieldDecryptionService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Author: yls
 * @Date 2022/2/11 15:39
 * @Description: 字段加密service层
 * @Version 1.0
 **/
@Service
public class FieldDecryptionServiceImpl extends ServiceImpl<FieldDecryptionMapper, FieldDecryptionDO>
        implements IFieldDecryptionService {

    @Override
    @Transactional(rollbackFor = Exception.class)
    public Boolean insert(FieldDecryptionDO fieldDecryption) {
        return save(fieldDecryption);
    }

    @Override
    @Transactional(readOnly = true)
    public List<FieldDecryptionDO> listFieldDecryptions() {
        return list();
    }
}
